package com.film.rowMapper;


import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.film.domain.Film;

public class FilmRowMapper implements RowMapper<Film>{

	@Override
	public Film mapRow(ResultSet res, int arg1) throws SQLException {
		Film film = new Film();
		film.setFilmId(res.getInt("film_id"));
		film.setFilmName(res.getString("film_name"));
		film.setFilmForeignName(res.getString("film_foreignName"));
		film.setFilmPlace(res.getString("film_place"));
		film.setFilmTime(res.getString("film_time"));
		film.setFilmShowTime(res.getString("film_showTime"));
		film.setFilmImg(res.getString("film_img"));
		film.setIsDelete(res.getInt("is_delete"));
		film.setBoxoffice(res.getFloat("boxoffice"));
		film.setExpect(res.getInt("expect"));
		film.setFilmIunguage(res.getString("film_lunguage"));
		film.setFilmIntroduce(res.getString("film_introduce"));
		film.setReviewScore(res.getString("review_score"));
		return film;
	}

}
